function deleteUploadFile(event, file_name, id, service_type) {
    $.post(base_url + "/service/delete-upload-file", {file_name:file_name, id: id, service_type: service_type}, function(resp) {
        $(event.target).parent().parent().remove();
    });
}

function getUploader(browser_button, container) {
    var uploader = new plupload.Uploader({
        runtimes: 'gears,html5,flash,silverlight,browserplus',
        browse_button: browser_button,
        container: container,
        max_file_size: '10mb',
        chunk_size: '1mb',
        require: 'chunks',
        url: base_url + '/service/plupload/id/' + ref_no,
        flash_swf_url: base_url + '/public/js/plupload/plupload.flash.swf',
        silverlight_xap_url: base_url + '/public/js/plupload/plupload.silverlight.xap',
        filters: [
            {title: "Image files",extensions: "jpg,gif,png,doc,docx,xlsx,xls,pdf"}
        ]
    });
    return uploader;
}

$(document).ready(function(){
    $(".datetime").datepicker({
        dateFormat: date_format
    });    
});